<template>
  <div class="page">
		<van-nav-bar
			:fixed="true" 
			:placeholder="true"
			:border="false"
			:title="title"
			left-arrow
			@click-left="$router.goBack()"
		></van-nav-bar>
		<div class="content">
			<van-address-list
			  :list="list"
			  default-tag-text="默认"
			  @add="onAdd"
			  @edit="onEdit"
			/>
		</div>
  </div>
</template>

<script>
export default {
  data () {
    return {
			title: '地址管理',
			list: [
				{
					id: '1',
					name: '张三',
					tel: '13000000000',
					address: '浙江省杭州市西湖区文三路 138 号东方通信大厦 7 楼 501 室',
					isDefault: true,
				},
				{
					id: '2',
					name: '李四',
					tel: '1310000000',
					address: '浙江省杭州市拱墅区莫干山路 50 号',
				},
			],
    }
  },
  computed: {

  },
  methods: {
		onAdd() {
			this.$router.togo('/add_address');
		},
		onEdit(item, index) {
			this.$router.togo('/set_address', {data: item});
		},
  },
  mounted () {
  }
}
</script>

<style scoped lang="scss">
@import '~styles/theme';
	/deep/ .van-button--danger{
		background-color: $theme_color;
		border-color: $theme_color;
		.van-button__text{
			color: #fff;
		}
	}
	/deep/ .van-radio__icon--round .van-icon{
		display: none;
	}
	/deep/ .van-nav-bar{
		.van-icon{
			color: #333;
			font-size: 20px;
		}
	}
</style>
